// 更换艺术家专场背景
var art_show_sites = ["./imgs/head1.jpg","./imgs/head2.jpg","./imgs/head3.jpg","./imgs/head5.jpg","./imgs/head6.jpg"]
var show_number= 1;
var timer = setInterval(function(){
  $(".art_show").css({
    "background-image":"url("+art_show_sites[show_number]+")"
  })
  var art_show_btn_now = $(".art_show_btn").children();
  if(true){
    $(".art_show_btn_now").removeClass("art_show_btn_now");
    $(art_show_btn_now[show_number]).addClass("art_show_btn_now");
  }
  show_number++;
  if(show_number == art_show_sites.length){
    show_number = 0;
  }
},6000);

var person_special_show = $(".person_special_show");
person_special_show.on("mouseover",function(){
  person_special_show.stop().animate({"width":"250px"},500);
  $(this).stop().animate({"width":"440px"},500);
  }).on("mouseout",function(){
    person_special_show.stop().animate({
      "width":"297.5px"
    },500)
})

  // section/part2按钮
var recommed_one_btn = $(".art_collect_rec button");
recommed_one_btn.on("click",function(){
  console.log($(this).children().attr("src"));
  if($(this).children().attr("src") == "imgs/jt_up.jpg"){
    $(this).children().attr("src","imgs/jt_down.jpg");
    $(this).parent().animate({"height":"220px"},500);
    $(".recommed_one").animate({"height":"450px"},500);
  }else{
    $(this).children().attr("src","imgs/jt_up.jpg");
    $(this).parent().animate({"height":"148px"},500);
    $(".recommed_one").animate({"height":"400px"},500);
  }
})

// section / part2 / page按钮
var page_one = $(".page_one"),
    page_two = $(".page_two"),
    change_page = $(".change_page");
page_one.on("click",function(){
  $(".recommeds_box").animate({"left":"0"},500);
  $(this).css({
    "background-color":"#333",
    "color":"#fff"
  });
  $(".page_two").css({
    "background-color":"#fff",
    "color":"#333"
  })
})
page_two.on("click",function(){
  $(".recommeds_box").animate({"left":"-1080px"},500);
  $(this).css({
    "background-color":"#333",
    "color":"#fff"
  });
  $(".page_one").css({
    "background-color":"#fff",
    "color":"#333"
  })
})
change_page.on("click",function(){
  if($(".recommeds_box").css("left") == "0px"){
    $(".recommeds_box").animate({"left":"-1080px"},500);
    $(".page_one").css({
      "background-color":"#fff",
      "color":"#333"
    });
    $(".page_two").css({
      "background-color":"#333",
      "color":"#fff"
    })
  }else{
    $(".recommeds_box").animate({"left":"0"},500);
    $(".page_two").css({
      "background-color":"#fff",
      "color":"#333"
    });
    $(".page_one").css({
      "background-color":"#333",
      "color":"#fff"
    })
  }
})

// section / parts3 / 最新上架 / 图片放大
var newest_check = $(".newest_arts_list .box img");
newest_check.on("mouseover",function(){
  $(this).css({
    "transform":"scale(1.1)"
  })
}).on("mouseout",function(){
  $(this).css({
    "transform":"scale(1.0)"
  })
})

// section / part5 / 张炯专场 / 图片放大
var zj_show_two = $(".zj_show_two img");
zj_show_two.on("mouseover",function(){
  $(this).stop().css({
    "transform":"scale(1.1)"
  },500);
}).on("mouseout",function(){
  $(this).stop().css({
    "transform":"scale(1.0)"
  },500);
})
